/**
 * 可下拉刷新的空页
 * 使用方式与PullToRefresh一致，仅包裹空数据展示
 */

import React, { FC } from 'react';
import { PullToRefresh } from 'antd-mobile-v2';
import Empty from '@/components/empty/index';

const EmptyRefresh: FC<any> = (props) => {
  const { emptyProps } = props;

  return (
    <PullToRefresh
      direction="down"
      indicator={{
        deactivate: '下拉刷新',
        activate: '松开立即刷新',
        release: (
          <p className="flex-center">
            {' '}
            <i className="iconfont iconjiazai mr-4" />
            正在刷新
          </p>
        ),
        finish: '刷新完成'
      }}
      {...props}
    >
      <Empty {...emptyProps} />
    </PullToRefresh>
  );
};

export default EmptyRefresh;
